import './assets/main.css'
import '@/assets/style/index.scss'

import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'
import './router/permission'

import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)

// 注册全局组件
import SvgIcon from '@/components/SvgIcon/index.vue'
import 'virtual:svg-icons-register'


const app = createApp(App)

app.use(pinia)
app.use(router)



// import { useMenuStore } from '@/stores/menu.js'
// const menuStore = useMenuStore()
// menuStore.refresh()  // 解决路由刷新, 要在pinia注册后刷新


// 注册自定义全局组件
app.component('svg-icon', SvgIcon);

app.mount('#app')
